Skip to content

Add support for verifying reply addresses - #172

Merged
danielzzz merged 6 commits into
danielzzz:masterfrom
vb-linetco:ignore-different-address-reply
Sep 10, 2026
Merged

Add support for verifying reply addresses#172
danielzzz merged 6 commits into
danielzzz:masterfrom
vb-linetco:ignore-different-address-reply

Conversation

@vb-linetco

Copy link
Copy Markdown
Contributor

On linux platform when using ping from iptuils there is an issue when some misbehaving hosts or other network devices may respond to a ping with a different address. The ping implementation of iputils unfortunately regards those as valid replies and prints the timing information nevertheless see: comparison of source address with target and the corresponding statistics output

We observed an issues with host being detected as alive when another misbehaving hosts replies to the echo requests. This PR Addresses the issue by adding an option to enable verification of reply addresses.


---------

Co-authored-by: sa-linetco <sa-linetco@users.noreply.github.com>
@vb-linetco vb-linetco changed the title Add support for verifying reply addresses (#2) Add support for verifying reply addresses Feb 25, 2025
@vb-linetco

Copy link
Copy Markdown
Contributor Author

Hey @danielzzz , when you get a chance, could you please take a look at this PR? Let me know if you spot anything that needs changing. Thanks!

@mondwan

mondwan commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator

Hi, after reading your implementation, can you rename the option to be ignoreDifferentAddressReply?

A side note. I have update the underlying node engine. You may need to rebuild this project development accordingly.

@vb-linetco

Copy link
Copy Markdown
Contributor Author

@mondwan I've updated the PR as you requested. If there are any issues with my changes, please let me know.

@danielzzz

Copy link
Copy Markdown
Owner

@vb-linetco sorry for having this in the backlog for so long 🙏 , I will look into asap.

Substring IPs like 18.8.8.8 still count as 8.8.8.8, ignored replies still keep footer stats, and PingConfig is missing the option.
@danielzzz

Copy link
Copy Markdown
Owner

@vb-linetco please rebase on this branch if possible:
https://github.com/danielzzz/node-ping/tree/test/pr-172-red

I found some edge cases, when your solution would break.
Added some failing tests for that for you to consider.

thank you!

@vb-linetco

Copy link
Copy Markdown
Contributor Author

@vb-linetco please rebase on this branch if possible: test/pr-172-red

I found some edge cases, when your solution would break. Added some failing tests for that for you to consider.

thank you!

Good catch, working on the fix, thanks for the review

@danielzzz

Copy link
Copy Markdown
Owner

thanks for your contribution @vb-linetco

@danielzzz
danielzzz merged commit 0f56a8a into danielzzz:master Sep 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants